package org.dbstar.scheduler.control.db.job;

import java.io.File;
import java.sql.Types;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.SqlParameter;

/**
 * 按照status查询Job
 * 
 * @author 代波
 * @since 1.0.0
 * @version 1.0.0
 * @date 2012-4-28
 */
public class JobQueryByStatus extends JobQuery {
	public JobQueryByStatus(JdbcTemplate jdbcTemplate, File resultRoot) {
		super(jdbcTemplate, "WHERE STATUS = ? AND SUBMIT_TIME > ? ORDER BY SYSTEM_IDENTIFIER, SEQUENCE", resultRoot);
		declareParameter(new SqlParameter("STATUS", Types.VARCHAR));
		declareParameter(new SqlParameter("SUBMIT_TIME", Types.BIGINT));
	}
}
